package com.mycompany.webapp.action;

import java.util.ArrayList;
import java.util.List;

import org.appfuse.webapp.action.BaseAction;

import com.mycompany.model.User;

public class JsonAction extends BaseAction {
	private List<User> usrList = new ArrayList<User>();
	private String name;
	private String age;
	private int intAge;
	public String getName() {
			System.out.println( "run getName");
		return name;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	public int getIntAge() {
		return intAge;
	}

	public void setIntAge(int intAge) {
		this.intAge = intAge;
	}

	public void setName(String name) {
		System.out.println( "run setName"+name);
		this.name = name;
	}

 

	public List<User> getUsrList() {
		return usrList;
	}

	public void setUsrList(List<User> usrList) {
		this.usrList = usrList;
	}

	@Override 
	public String execute() throws Exception {
		System.out.println( "name:"+name);
		name="lihanting";
		intAge = 25;
		usrList.clear();
		usrList.add(new User("jack","32"));
		usrList.add(new User("moliqin","31"));
		usrList.add(new User("hj","30"));
		
		return super.SUCCESS;
	}

}
